<%
# Niko-niko Calendar plugin for Redmine 2.X
# Copyright (C) 2013 piccagliani
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
%>
<% if false %> ######## HEADER <% end %>
<% content_for :header_tags  do %>
<%= stylesheet_link_tag "vendor/jquery.jqplot.css", :plugin => 'redmine_nikoniko_calendar2' %>
<%= stylesheet_link_tag "index", :plugin => 'redmine_nikoniko_calendar2' %>
<%= javascript_include_tag "vendor/gauge.min.js", "vendor/jquery.jqplot.js", "vendor/plugins/jqplot.pieRenderer.js",:plugin => 'redmine_nikoniko_calendar2' %>
<!--[if lt IE 9]>
<%= javascript_include_tag "vendor/excanvas.js", :plugin => 'redmine_nikoniko_calendar2' %>
<![endif]-->
<%= javascript_include_tag "common", "index",:plugin => 'redmine_nikoniko_calendar2' %>
<script type="text/javascript">
NikoCal.relative_url_root = "<%= Redmine::Utils::relative_url_root %>";
</script>
<% end %>

<% if false %> ######## MAIN CONTENTS <% end %>
<h2><%= l(:nikoniko_calendar) %></h2>

<h3><%= l(:nikoniko_calendar_history) %></h3>
<div class="h4_contents">
    <div id="NikonikoCalendar"></div>
</div>

<div id="NikonikoUpdateDialog" style="display:none">
    <form id="NikonikoUpdateForm">
        <div>
            <a href="#"><%= image_tag("nikoniko_0.png", :plugin => 'redmine_nikoniko_calendar2', :style => "display:none", :alt => "未登録") %></a>
            <a href="#"><%= image_tag("nikoniko_1.png", :plugin => 'redmine_nikoniko_calendar2', :style => "display:none", :alt => "悪い") %></a>
            <a href="#"><%= image_tag("nikoniko_2.png", :plugin => 'redmine_nikoniko_calendar2', :style => "display:none", :alt => "普通") %></a>
            <a href="#"><%= image_tag("nikoniko_3.png", :plugin => 'redmine_nikoniko_calendar2', :style => "display:none", :alt => "良い") %></a>
        </div>
        <input type="hidden" name="date" value="" />
        <input type="text" name="comment" maxlength="140" /><br />
        <input type="button" value="送信" /> 
    </form>
</div>
